<template>
  <el-form ref='formRef' :model='form'>
    <el-form-item prop='iid' label='主键' :label-width='$store.state.formLabelWidth4' v-show='1===0'>
      <el-input v-model='form.iid'></el-input>
    </el-form-item>
    <el-form-item prop='roleid' label='角色编号' :label-width='$store.state.formLabelWidth4'>
      <el-input v-model='form.roleid'></el-input>
    </el-form-item>
    <el-form-item prop='rolename' label='角色名称' :label-width='$store.state.formLabelWidth4'>
      <el-input v-model='form.rolename'></el-input>
    </el-form-item>
    <el-form-item prop='remark' label='备注' :label-width='$store.state.formLabelWidth4'>
      <el-input v-model='form.remark'></el-input>
    </el-form-item>
  </el-form>
</template>

<script setup>
import { ref, reactive, nextTick } from 'vue'

const formRef = ref()
let form = reactive({
  iid: 0,
  roleid: '',
  rolename: '',
  remark: ''
})

const setValue = formData => {
  form.iid = formData.iid
  form.roleid = formData.roleid
  form.rolename = formData.rolename
  form.remark = formData.remark
}

const getValue = () => {
  return form
}

const resetFields = () => {
  formRef.value.resetFields()
}

defineExpose({setValue, getValue, resetFields})

</script>